home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / X11R4 / cmds / X / include / RCS / os.h,v < prev    next >
Encoding:
Text File  |  1990-02-15  |  4.2 KB  |  172 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.2
  10. date     90.02.14.19.21.08;  author tve;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     90.02.14.16.17.24;  author tve;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @Original X11R4 distribution
  22. @
  23.  
  24.  
  25. 1.2
  26. log
  27. @fixed alloca which is already taken care of in standard sprite header
  28. files.
  29. @
  30. text
  31. @/***********************************************************
  32. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
  33. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  34.  
  35.                         All Rights Reserved
  36.  
  37. Permission to use, copy, modify, and distribute this software and its 
  38. documentation for any purpose and without fee is hereby granted, 
  39. provided that the above copyright notice appear in all copies and that
  40. both that copyright notice and this permission notice appear in 
  41. supporting documentation, and that the names of Digital or MIT not be
  42. used in advertising or publicity pertaining to distribution of the
  43. software without specific, written prior permission.  
  44.  
  45. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  46. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  47. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  48. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  49. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  50. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  51. SOFTWARE.
  52.  
  53. ******************************************************************/
  54.  
  55. /* $XConsortium: os.h,v 1.39 89/12/06 16:41:26 rws Exp $ */
  56.  
  57. #ifndef OS_H
  58. #define OS_H
  59. #include "misc.h"
  60.  
  61. #ifdef INCLUDE_ALLOCA_H
  62. #include <alloca.h>
  63. #endif
  64.  
  65. #define NullFID ((FID) 0)
  66.  
  67. #define SCREEN_SAVER_ON   0
  68. #define SCREEN_SAVER_OFF  1
  69. #define SCREEN_SAVER_FORCER 2
  70.  
  71. #if defined(stellar)
  72. #define MAX_REQUEST_SIZE 65535
  73. #else
  74. #define MAX_REQUEST_SIZE 16384
  75. #endif
  76.  
  77. typedef pointer    FID;
  78. typedef struct _FontPathRec *FontPathPtr;
  79. typedef struct _NewClientRec *NewClientPtr;
  80.  
  81. #ifndef NO_ALLOCA
  82. /*
  83.  * os-dependent definition of local allocation and deallocation
  84.  * If you want something other than Xalloc/Xfree for ALLOCATE/DEALLOCATE
  85.  * LOCAL then you add that in here.
  86.  */
  87. #if defined(__HIGHC__)
  88.  
  89. extern char *alloca();
  90.  
  91. #if HCVERSION < 21003
  92. #define ALLOCATE_LOCAL(size)    alloca((int)(size))
  93. pragma on(alloca);
  94. #else /* HCVERSION >= 21003 */
  95. #define    ALLOCATE_LOCAL(size)    _Alloca((int)(size))
  96. #endif /* HCVERSION < 21003 */
  97.  
  98. #define DEALLOCATE_LOCAL(ptr)  /* as nothing */
  99.  
  100. #endif /* defined(__HIGHC__) */
  101.  
  102.  
  103. #ifdef __GNUC__
  104. /*#define alloca __builtin_alloca  # This is done in alloca.h already */
  105. #define ALLOCATE_LOCAL(size) alloca((int)(size))
  106. #define DEALLOCATE_LOCAL(ptr)  /* as nothing */
  107. #else /* ! __GNUC__ */
  108. /*
  109.  * warning: mips alloca is unsuitable in the server, do not use.
  110.  */
  111. #if defined(vax) || defined(sun) || defined(apollo) || defined(stellar)
  112. /*
  113.  * Some System V boxes extract alloca.o from /lib/libPW.a; if you
  114.  * decide that you don't want to use alloca, you might want to fix 
  115.  * ../os/4.2bsd/Imakefile
  116.  */
  117. char *alloca();
  118. #define ALLOCATE_LOCAL(size) alloca((int)(size))
  119. #define DEALLOCATE_LOCAL(ptr)  /* as nothing */
  120. #endif /* who does alloca */
  121. #endif /* __GNUC__ */
  122.  
  123. #endif /* NO_ALLOCA */
  124.  
  125. #ifndef ALLOCATE_LOCAL
  126. #define ALLOCATE_LOCAL(size) Xalloc((unsigned long)(size))
  127. #define DEALLOCATE_LOCAL(ptr) Xfree((pointer)(ptr))
  128. #endif /* ALLOCATE_LOCAL */
  129.  
  130.  
  131. #define xalloc(size) Xalloc((unsigned long)(size))
  132. #define xrealloc(ptr, size) Xrealloc((pointer)(ptr), (unsigned long)(size))
  133. #define xfree(ptr) Xfree((pointer)(ptr))
  134.  
  135. int        ReadRequestFromClient();
  136. char        *strcat();
  137. char        *strncat();
  138. char        *strcpy();
  139. char        *strncpy();
  140. Bool        CloseDownConnection();
  141. FontPathPtr    GetFontPath();
  142. FontPathPtr    ExpandFontNamePattern();
  143. FID        FiOpenForRead();
  144. void        CreateWellKnownSockets();
  145. int        SetDefaultFontPath();
  146. void        FreeFontRecord();
  147. int        SetFontPath();
  148. void        ErrorF();
  149. void        Error();
  150. void        FatalError();
  151. void        ProcessCommandLine();
  152. void        Xfree();
  153. void        FlushAllOutput();
  154. void        FlushIfCriticalOutputPending();
  155. unsigned long    *Xalloc();
  156. unsigned long    *Xrealloc();
  157. long        GetTimeInMillis();
  158.  
  159. #endif /* OS_H */
  160. @
  161.  
  162.  
  163. 1.1
  164. log
  165. @Initial revision
  166. @
  167. text
  168. @d74 1
  169. a74 1
  170. #define alloca __builtin_alloca
  171. @
  172.